package com.caokele.demo.auth.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AuthController {
    @Value("${auth.test:}")
    private String test;

    @GetMapping("/api/auth/server-name")
    public String serverName() {
        return "auth";
    }

    @GetMapping("/custom-api/auth/test")
    public String testCustomAPi() {
        return "auth-custom";
    }

    @GetMapping("/api/auth/config/test")
    @ResponseBody
    public String testConfig() {
        return test;
    }
}
